package com.eee.xiang.market.utils;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.LongSerializationPolicy;

/**
 * gson
 */
public class GsonUtil {
    public final static Gson gson = gsonBuild();

    public static Gson gsonBuild(){
        return new GsonBuilder().setLongSerializationPolicy(LongSerializationPolicy.STRING)//Long类型不会使用科学计数法
                .setDateFormat("yyyy-MM-dd HH:mm:ss")//时间格式
                .create();
    }
}
